package com.swyc.osschat.Test.LambdaTest.Controller;

import java.util.function.UnaryOperator;

/**
 * @author zhaol@yunrong.cn
 * @version V2.1
 * @since 2.1.0 2019/8/9 15:34
 */
public class UnaryOperatorTest {
    public static void main(String[] args) {
        UnaryOperator<Boolean> unaryOperator = uglily -> !uglily;
        Boolean apply2 = unaryOperator.apply(false);
        System.out.println(apply2);
        UnaryOperator<Boolean> unaryOperator1 = uglily -> test2(uglily,10);
        Boolean apply3 = unaryOperator.apply(test1(8));
        System.out.println(apply3);
    }

    public static boolean test1(int value){
        return value>9;
    }

    public static boolean test2(boolean flag,int value){
        if (false){
            return false;
        }
        return value<11;
    }
}
